Skip to content

Pre commit setup - #126

Merged
nezhar merged 4 commits into
mainfrom
pre-commit-setup
Jul 31, 2026
Merged

Pre commit setup#126
nezhar merged 4 commits into
mainfrom
pre-commit-setup

Conversation

@nezhar

@nezhar nezhar commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces pre-commit hooks and makes a large number of code style and formatting improvements across the codebase. The main goals are to enforce consistent code formatting, simplify argument lists, and improve maintainability. No functional changes are introduced—these are all non-breaking formatting and linting updates.

The most important changes include:

Pre-commit Integration

  • Added a .pre-commit-config.yaml with several hooks (e.g., trailing whitespace, end-of-file fixer, ruff, pyupgrade, actionlint) to automate code style checks.
  • Added a GitHub Actions workflow .github/workflows/pre-commit.yml to run pre-commit checks on push and pull requests.

Code Formatting and Consistency

  • Updated function argument formatting in multiple files (e.g., src/vibepod/cli.py, src/vibepod/commands/config.py, src/vibepod/commands/run.py, src/vibepod/commands/skills.py) to place each argument on its own line for clarity and consistency. (F5f8be28R1, Facfa779R1, F06f699aR1, F890bd80R1)
  • Added or adjusted trailing commas and fixed dictionary closing braces in several files to comply with formatting standards. (F4f0b75dR1, F4f0b75dR2)

String Formatting and Error Message Improvements

  • Ensured all multi-line error and info messages use trailing commas for consistency and proper formatting, especially in user-facing error and warning messages. (F74ea2f3R1, F06f699aR2, F06f699aR3, F06f699aR4, F06f699aR5, F06f699aR6, F06f699aR7, F06f699aR8, F06f699aR9, Facfa779R2, Ff1574fdR1, Ff1574fdR2, Ff1574fdR3)

Minor Refactoring

  • Simplified some conditional logic and function calls for readability (e.g., collapsing multi-line if statements, argument lists). (F06f699aR10, F969e939R1, Fdf8f5e7R1)

These changes collectively enforce a consistent code style and set up automated checks to maintain it going forward.

Summary by CodeRabbit

  • Chores

    • Added automated pre-commit checks for pushes and pull requests.
    • Standardized code, configuration, and test formatting across the project.
  • Documentation

    • Clarified Podman network and container-name resolution setup instructions.
  • Configuration

    • Updated the default JCode agent configuration with an empty ports setting.
  • Style

    • Improved formatting and readability of command-line messages and declarations without changing core behavior.

nezhar added 2 commits July 30, 2026 18:19
Hook set mirrors the anexia/django-generic-contact layout: base hooks,
pyupgrade --py310-plus, add-trailing-comma, ruff check --fix and
ruff format. Reformat codebase accordingly.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c74a990-febd-4d0d-ad7d-8dfd2e9c242f

📥 Commits

Reviewing files that changed from the base of the PR and between b656d40 and e64a21d.

📒 Files selected for processing (2)
  • .github/workflows/pre-commit.yml
  • src/vibepod/core/config.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/pre-commit.yml

📝 Walkthrough

Walkthrough

The pull request adds pre-commit automation and reformats documentation, CLI modules, core modules, and tests. It also adds default jcode port configuration. Most application behavior remains unchanged.

Changes

Formatting and validation updates

Layer / File(s) Summary
Pre-commit automation and documentation
.github/workflows/pre-commit.yml, .pre-commit-config.yaml, docs/configuration.md, scripts/check_default_images.py
Adds pre-commit hooks and CI execution, updates Podman DNS guidance, and reformats a timeout message.
CLI declarations and messages
src/vibepod/cli.py, src/vibepod/commands/*
Reflows Typer annotations, function calls, and CLI messages without changing command semantics.
Core implementation and configuration
src/vibepod/compat.py, src/vibepod/constants.py, src/vibepod/core/*
Reformats core code and adds an empty ports list to the default jcode configuration.
Test and smoke-test formatting
tests/*
Reformats test signatures, assertions, fixtures, SQL calls, mocks, and integration diagnostics.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding pre-commit configuration and workflow checks.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pre-commit-setup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pre-commit.yml:
- Around line 12-13: Update the checkout step using actions/checkout@v4 to
disable credential persistence with persist-credentials: false, and configure
the workflow permissions so contents access is read-only. Keep the existing
checkout behavior unchanged otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f98fd91f-693b-450f-85c5-7a251e5b3132

📥 Commits

Reviewing files that changed from the base of the PR and between 7b45600 and b656d40.

📒 Files selected for processing (32)
  • .github/workflows/pre-commit.yml
  • .pre-commit-config.yaml
  • docs/configuration.md
  • scripts/check_default_images.py
  • src/vibepod/cli.py
  • src/vibepod/commands/attach.py
  • src/vibepod/commands/config.py
  • src/vibepod/commands/doctor.py
  • src/vibepod/commands/list_cmd.py
  • src/vibepod/commands/logs.py
  • src/vibepod/commands/run.py
  • src/vibepod/commands/skills.py
  • src/vibepod/commands/task.py
  • src/vibepod/compat.py
  • src/vibepod/constants.py
  • src/vibepod/core/docker.py
  • src/vibepod/core/launch.py
  • src/vibepod/core/skills_engine.py
  • src/vibepod/core/tasks.py
  • tests/integration/test_runtime_smoke.py
  • tests/test_cli.py
  • tests/test_config.py
  • tests/test_docker.py
  • tests/test_doctor.py
  • tests/test_overlay.py
  • tests/test_proxy_permissions.py
  • tests/test_run.py
  • tests/test_session_logger.py
  • tests/test_skills.py
  • tests/test_skills_engine_driver.py
  • tests/test_task_cmd.py
  • tests/test_tasks.py
💤 Files with no reviewable changes (1)
  • docs/configuration.md

Comment thread .github/workflows/pre-commit.yml
nezhar added 2 commits July 31, 2026 05:52
Restrict the token to contents: read and disable checkout credential
persistence, since pre-commit executes repository-controlled hooks.
The jcode entry was added without a ports key, so
test_default_config_exposes_agent_ports fails with a KeyError across
the whole CI matrix.
@nezhar
nezhar merged commit a8543f9 into main Jul 31, 2026
49 checks passed
nezhar added a commit that referenced this pull request Aug 1, 2026
add-trailing-comma and ruff-format landed on main (#126) after this
branch was cut; align the branch files so the pre-commit CI check
passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant